package de.gbeine.java.depview.ui.controller;

import com.google.common.eventbus.Subscribe;

import de.gbeine.java.depview.event.ChangeStatusEvent;

/**
 *
 * @author gbeine
 *
 */
public final class StatusPanelController {

    /**
     *
     */
    private final StatusPanel statusPanel;

    /**
     *
     * @param pStatusPanel
     */
    public StatusPanelController(final StatusPanel pStatusPanel) {
        this.statusPanel = pStatusPanel;
    }

    /**
     *
     * @param pChangeStatusEvent
     */
    @Subscribe
    public void onChangeStatusEvent(final ChangeStatusEvent pChangeStatusEvent) {
        this.statusPanel.setMessage(pChangeStatusEvent.getMessage());
    }
}
